home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
HYPERCAR
/
XCMDS_&_
/
JORGENSE
/
CHOOSERN.C
next >
Wrap
C/C++ Source or Header
|
1988-10-12
|
967b
|
36 lines
/*
chooserName -- sample XFCN to return the chooser name
10 Oct 1988 Greg Jorgensen, Mac DTS
⌐ Apple Computer Inc., 1988
Gets the chooser name from the System file STR -16096 resource
THIS CODE IS NOT SUPPORTED BY APPLE COMPUTER
It may not work with future releases.
May be distributed free of charge.
*/
#include <HyperXCmd.h>
/* **** WARNING: DO NOT USE GLOBAL VARIABLES! **** */
pascal void main(paramPtr)
XCmdBlockPtr paramPtr;
{
int saveResFile;
Handle theHndl;
saveResFile = CurResFile(); /* save the current res file id */
UseResFile(0); /* point to System file */
theHndl = GetResource('STR ', -16096); /* get the resource */
if (theHndl) {
DetachResource(theHndl); /* take resource from resource mgr */
PtoCstr(*theHndl); /* change to C-string in place */
}
UseResFile(saveResFile); /* reset to saved res file */
paramPtr->returnValue = theHndl; /* stuff result for Hypercard */
}
#include "XCmdGlue.inc.c"